<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Davinci</title>
	<script src="/js/jquery/jquery-1.8.2.min.js"></script>
	<script src="/js/jquery/jquery.plugins.min.js"></script>
	<script src="/js/kendo/kendo.all.min.js"></script>	
	<script src="/js/kendo/cultures/kendo.culture.es-US.min.js"></script>		
	<script src="/js/app/util.js"></script>
	<link href="/css/app_gray.css" rel="stylesheet" />        
	<link href="/js/kendo/css/kendo.common.min.css" rel="stylesheet" />
	<link href="/js/kendo/css/kendo.default.min.css" rel="stylesheet" />
	<link href="/js/kendo/css/kendo.dataviz.min.css" rel="stylesheet" />
	<link href="/js/kendo/css/kendo.dataviz.default.min.css" rel="stylesheet" />
        <script>
            $(document).ready(function() {
                $("#menu").kendoMenu();
            });
            
            function refreshSummary()
            {
                $.ajax({
                    type: 'post',
                    url: '/invest/refreshSummary',
                    data: {
                    },
                    dataType: 'json',
                    success: function(obj){
                    },
                });
                
                return false;
            }
            
            function refreshLifeTime()
            {
                $.ajax({
                    type: 'post',
                    url: '/hyip/refreshLifeTime',
                    data: {
                    },
                    dataType: 'json',
                    success: function(obj){
                    },
                });
        
                return false;
            }
        </script>
</head>

<body>
<ul id="menu">
    <li><a href="/hyip">Hyip</a></li>
    <li><a href="/invest">Invest</a></li>
    <li><a href="/monitor">Monitor</a></li>
    <li>Statistic<ul>
        <li><a href="/statistic/numberDaily">Number daily</a></li>
        <li><a href="/statisticSite/index">Sites</a></li>
    </ul></li>
    <li>Action<ul>
        <li><a href="" onclick="return refreshLifeTime();">Refresh life time</a></li>		
    </ul></li>
    {if Yii::app()->user->isGuest}
   		<li><a href="/home/login">Login</a></li>
   	{else}
   		<li><a href="/home/logout">Logout</a></li>
	{/if}
     {if !Yii::app()->user->isGuest}
   	<li>Deposit: ${Yii::app()->session['summary']['depositTotal']} - Withdraw: ${Yii::app()->session['summary']['withdrawTotal']}
            {if Yii::app()->session['summary']['depositTotal'] > 0}
                 => {number_format({Yii::app()->session['summary']['withdrawTotal']}/{Yii::app()->session['summary']['depositTotal']}*100,2)}%             
             {/if}
        </li>
	<li>Finished: ${Yii::app()->session['summary']['currentProfit']}
    </li>
        <li><a href="" onclick="return refreshSummary();">Refresh</a></li>
    {/if}
	
</ul>
{$content}

</body>
</html>